package
{
	import flash.display.Sprite;
	import flash.geom.Point;
	
	import org.flintparticles.common.counters.*;
	import org.flintparticles.common.displayObjects.RadialDot;
	import org.flintparticles.common.initializers.*;
	import org.flintparticles.twoD.actions.*;
	import org.flintparticles.twoD.emitters.Emitter2D;
	import org.flintparticles.twoD.initializers.*;
	import org.flintparticles.twoD.renderers.*;
	import org.flintparticles.twoD.zones.*;
	
	[SWF(width = "500", height = "400", frameRate = "30", backgroundColor = "0x000000")]
	public class Flint extends Sprite
	{
		private var emitter:Emitter2D = new Emitter2D();
		private var renderer:DisplayObjectRenderer = new DisplayObjectRenderer();
		
		public function Flint()
		{
			emitter.counter = new Steady(100);
			emitter.addInitializer(new ImageClass(RadialDot, [2]));
			emitter.addInitializer(new Position(new LineZone(new Point(-5, -5), new Point(505, -5))));
			emitter.addInitializer(new Velocity(new PointZone(new Point(0, 65))));
			
			emitter.addAction(new Move());
			emitter.addAction(new DeathZone(new RectangleZone(-10, -10, 520, 420), true));
			emitter.addAction(new RandomDrift(15, 15));
			
			
			addChild(renderer);
			renderer.addEmitter(emitter);
			
			emitter.start();
			emitter.runAhead(10);
		}
	}
}